Repository navigation
dapf: take the T8132 handoff from the tree, not a board list - #429
Conversation
RyanTheTide
left a comment
There was a problem hiding this comment.
Thanks, and for the J715 runs on 26.5 and 26.6.2. One change we'd ask for, under the project's no-board-gates rule: rather than add apple,j715 to the list, drop the list.
dapf_init_j713() (src/dapf.c:670 on main) already returns without touching anything unless /chosen carries linux-enablement-mac,dapf-handoff, and then hands off only the consumers that property lists (plus ...,dapf-power-on-handoff for power). So that property is already the contract, and your description says the J715 tree states it. The board list in dapf_init_fdt() only adds a second gate that every new M4 laptop or desktop has to be added to by hand (the J773g and the J715 today, the next one tomorrow).
Suggested shape: on T8132 call dapf_init_j713() directly and let its existing described check decide; a tree without the property keeps the firmware's DAPF state exactly as now. A host test for both cases (property present on a non-listed board: handoff; property absent: preserved) would cover it. If you'd rather keep this PR to one line, please at least say in the commit message why the property alone isn't enough.
Assisted-by: LLM (Claude:Opus 5.5)
|
Blockers: 1.
Something that bears on the follow-up RFC #430 (which builds on this branch): the "MTP cold-started by Linux" case already has a property. A consumer that iBoot left off and Linux cold-starts is programmed as a halted consumer when the tree also lists it in CI is green (14/14) and the commit has a human HW row: J715 on the default command line with the exact head, booted both through U-Boot and directly from Stage 1 (no U-Boot). Pass: the dapf log shows each requested consumer programmed or preserved; the keyboard, trackpad and AOP microphone work; 0 failed units, 0 new kernel errors. Plus a J713 no-regression boot once the list is dropped. Assisted-by: LLM (Claude:Opus 5.5) |
833fa75 to
33a7632
Compare
|
Re-reviewed at 33a7632. The blocker is fixed: the board list is gone and every T8132 tree goes through The code change is small and right. What it changes in practice is the part you flagged: every T8132 tree that includes
Merge order: this and linux#2745 belong together; with linux#2745 alone the J715 keeps its old MTP fault. Assisted-by: LLM (Claude:Opus 5.5) |
|
Thanks for the re-review. On the rows:
Agreed on the merge order with aurora-silicon/linux#2745. I've stated it in that PR's description. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial review at 33a76325753aa7acfac5d1a5e5c812e1143fbc1a:
0 code/policy/attribution blockers.
- §1 (No model gating): Good fix—dropping the hardcoded
{"apple,j713", "apple,j604"}board list insrc/dapf.c:846-855lets/chosen'slinux-enablement-mac,dapf-handoff/dapf-power-on-handoff/dapf-halted-handoffcontract indapf_init_j713()decide across all T8132 trees while preserving firmware state when the property is absent. - §2 (Production-ready), §3 (Code correctness & safety), §4 (Attribution — human author/committer +
Signed-off-byonly), §6 (Naming): all clean.
Holding approval only for remaining CI & §5 verification items:
- CI on live head
33a76325: all 6 workflows (format-check,build,stage1-size,aurora-agent-policy,test,esp-stage2-size) are currentlyaction_required(awaiting maintainer workflow approval) and have not yet produced green results on this head. - §5 Hardware rows:
- J713 no-regression boot on this head (dapf log, keyboard/trackpad, AOP microphones, 0 failed units / 0 SELinux denials / 0 new kernel errors).
- Desktop T8132 (e.g. J773g Mac mini) boot, since
t8132-jxxx.dtsidefinesdapf-handofffor/arm-io/aopand/arm-io/pmpand desktop T8132 boards will take this path for the first time (confirm dapf log and 0 new DART/AOP faults). - J715 U-Boot boot path log (noting you're preparing it alongside
aurora-silicon/linux#2745) plus regression counts (0 failed units / 0 SELinux denials / 0 new kernel errors).
(Minor non-blocking observation: dapf_init_j713() and its log message still say J713; fine to leave for a follow-up rename.)
Assisted-by: LLM (Gemini 4 Neon)
|
Approved the 6 fork CI workflow runs on Assisted-by: LLM (Gemini 4 Neon) |
Without U-Boot (m1n1 stage 1 -> aura -> Linux), nothing keeps the J715's MTP running, so Linux cold-starts it. As on the J604, name /arm-io/mtp in linux-enablement-mac,dapf-halted-handoff so the loader programs its DART filter as for a halted consumer, and put the MTP and its HID on DART stream 0 (streams 1 to 3 remapped to 0) instead of the stream 1 the J713's running MTP is handed over on. Before this, the MTP firmware's first access faulted with "CTE invalid" and the keyboard and trackpad never came up. With U-Boot in the chain, U-Boot has to leave the MTP alone, as on the J604: if it starts the MTP for its keyboard, it stops it again before Linux, and the firmware crashes on Linux's second start. Linux still finds it halted on stream 0. A boot that hands the MTP over running, as the J713 does, would need the J713's stream 1 layout instead. Neither stage 1 -> aura -> Linux on 26.6.2 nor U-Boot with the J715 in its keyboard skip list does that, and it has not been tested. Tested on a J715 with OS firmware 26.6.2 and aura main plus aurora-silicon/aura#429: the MTP says hello, and the keyboard and trackpad work, with no DART faults. Through U-Boot aurora-wip with the J715 in that skip list: the same. Through U-Boot aurora-wip as is: the MTP firmware crashes as on the J604. Signed-off-by: Kazuhide Takahashi <kazuhide.t@linux-powered.com>
|
The second J715 boot path is done: stage 1 → this aura → U-Boot → Linux, OS firmware 26.6.2. The aura is the same build as in my first row (main 58e712b + this change, plus the same local-only parts), with the aurora-silicon/linux#2745 tree. U-Boot is aurora-silicon/u-boot
I promised the dapf log here, but I don't have it. aura's lines went only to the screen, and this run recorded the U-Boot and Linux sides, not aura's. If you need it, I can capture it from the screen on the next boot. Still not covered by me: the J713, the J773g, and a J715 on 27.x. |
Without U-Boot (stage 1 -> aura -> Linux), nothing keeps the J715's MTP running, so Linux cold-starts it. As on the J604, name /arm-io/mtp in linux-enablement-mac,dapf-halted-handoff so the loader programs its DART filter as for a halted consumer, and put the MTP and its HID on DART stream 0 (streams 1 to 3 remapped to 0) instead of the stream 1 the J713's running MTP is handed over on. Before this, the MTP firmware's first access faulted with "CTE invalid" and the keyboard and trackpad never came up. With U-Boot in the chain, U-Boot has to leave the MTP alone, as on the J604: if it starts the MTP for its keyboard, it stops it again before Linux, and the firmware crashes on Linux's second start. Linux still finds it halted on stream 0. A boot that hands the MTP over running, as the J713 does, would need the J713's stream 1 layout instead. Neither stage 1 -> aura -> Linux on 26.6.2 nor U-Boot with the J715 in its keyboard skip list does that, and it has not been tested. Tested on a J715 with OS firmware 26.6.2 and aura main plus aurora-silicon/aura#429: the MTP says hello, and the keyboard and trackpad work, with no DART faults. Through U-Boot aurora-wip with the J715 in that skip list: the same. Through U-Boot aurora-wip as is: the MTP firmware crashes as on the J604. Signed-off-by: Kazuhide Takahashi <kazuhide.t@linux-powered.com>
|
The dapf lines I owed here are below, from a third J715 boot: stage 1 → aura → U-Boot → Linux, OS firmware 26.6.2.
The caveats come first:
As read, these match what this PR intends:
A console capture would be better evidence. I can't get one on this Mac without a serial setup, so I'll leave that row to someone with one. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Re-review against pre-pr-checklist.md (§1–§6) at 33a76325753aa7acfac5d1a5e5c812e1143fbc1a: REQUEST_CHANGES.
Code & Attribution (§1 / §2 / §3 / §4 / §6)
src/dapf.c:846-855is clean: dropping the hardcoded{"apple,j713", "apple,j604"}board list and lettingdapf_init_j713()decide from/chosen'slinux-enablement-mac,dapf-handoff/dapf-halted-handoffproperties satisfies §1 cleanly while preserving firmware state when the property is absent.- Commit
33a76325753acarries human author/committer + humanSigned-off-by:only, zero AI trailers.
Blockers
- CI failure —
test / Pytest (ubuntu-latest + gcc)(tests/python/test_j713_dapf_instance.py:123):- Removing the only call to
fdt_node_check_compatible()insrc/dapf.cbreaks the-Wall -Wextra -Werrorhost test build intests/python/test_j713_dapf_instance.py::test_j713_instance_and_power_flow:dapf-instance.c:106:12: error: ‘fdt_node_check_compatible’ defined but not used [-Werror=unused-function] - This failure also cancelled the remaining 3 pytest matrix legs (
ubuntu-latest + llvm,macos-26 + llvm-brew,macos-15 + llvm-brew). - Fix: Remove the unused
fdt_node_check_compatible()stub attests/python/test_j713_dapf_instance.py:123-124(and ideally add adapf_init_fdt((void *)1)check covering bothhandoff=trueandhandoff=false).
- Removing the only call to
- CI failure —
aurora-agent-policy / policy:- Fails because the branch base (
58e712b9) predates #428 (f3c1f9a4, canonical.github/aurora/AGENTS.mdonmain). Rebasing onto currentmainwill clear this check.
- Fails because the branch base (
- §5 (Evidence — remaining cross-board T8132 rows before merge):
- Thanks for the third J715 U-Boot boot and transcribed screen DAPF lines (
11:10:08Z) — those matchdapf_init_j713()'s intended behavior on J715 (note that/arm-io/aopis intentionally skipped silently indapf_init_j713()atsrc/dapf.c:773sincekboothandles AOP's DAPF separately). - Because this change activates
dapf_init_j713()for every T8132 tree includingt8132-jxxx.dtsi/t8132-laptop.dtsi, and the J715 run carried local-only patches without regression counts (0 SELinux denials / 0 failed units / 0 new kernel errors), merge still needs clean exact-head hardware rows (from maintainers/hardware owners, since you only have a J715 on 26.6.2) for:- J713 no-regression boot on the rebased head (dapf log, keyboard/trackpad, AOP mics, regression counts);
- Desktop T8132 (e.g. J773g Mac mini) taking the AOP/PMP handoff for the first time (dapf log, 0 new DART/AOP faults, regression counts).
- Coordinate merge order with
aurora-silicon/linux#2745.
- Thanks for the third J715 U-Boot boot and transcribed screen DAPF lines (
Assisted-by: LLM (Gemini 4 Neon)
33a7632 to
67755d7
Compare
|
Thanks for the re-review. Updated:
Checked locally on the rebased head:
§5 counts for the J715 rows (stage 1 → this aura → Linux, and the same through U-Boot):
The J713 and J773g rows are still open; I can't run either. |
|
Re-checked at 67755d7. The From my last review, merge order with aurora-silicon/linux#2745 is settled. Two rows are still missing before merge:
Not for this PR: the same J713/J604 board lists are still in Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal adversarial pre-PR checklist (§1–§6) re-review at 67755d70e92e2e1daecba8603040bc372a06a75b: REQUEST_CHANGES.
Status Summary
- Superseded? No (
src/dapf.c:848onmainstill gatesdapf_init_j713()on{"apple,j713", "apple,j604", NULL}). - Stage 1 impact (§3): Yes —
src/dapf.c(dapf.o) is unconditionally inOBJECTSinMakefile(mainline 255) and reachable fromkboot_boot()in Stage 1 (RELEASE=1 CHAINLOADING=1). - Code, Tests & Attribution (§1–§4, §6): Clean — 0 code or attribution blockers.
- All prior code/test/rebase blockers from
33a76325753aare fixed:src/dapf.ccleanly drops the board list and defers to/chosen'slinux-enablement-mac,dapf-handoffcontract (return fdt ? dapf_init_j713((void *)fdt) : 0;);tests/python/test_j713_dapf_instance.pydrops the unusedfdt_node_check_compatible()stub, addsdapf_init_fdt()coverage (handoff present, absent, andNULLtree) plus the"tree decides"negative control; branch is rebased onto post-#428main(56299352, mergeable cleanly); single commit67755d70e92ehas human author/committer + humanSigned-off-by:only, zero AI trailers. - Thanks also for posting the J715 §5 regression counts (SELinux N/A, 2 unchanged local failed units, 0 new kernel errors).
- All prior code/test/rebase blockers from
Remaining Blockers (CI & §5 Evidence)
- Live CI not yet green on
67755d70e92e:- All 6 workflows (
build,test,format-check,stage1-size,esp-stage2-size,aurora-agent-policy) are currentlyaction_requiredon67755d70e92eand must pass (includingstage1-sizesincedapf.ois linked into Stage 1).
- All 6 workflows (
- §5 Cross-board T8132 hardware evidence (maintainer / hardware-owner rows):
- Because this change activates
dapf_init_j713()for every T8132 tree carryingdapf-handoff(t8132-jxxx.dtsiandt8132-laptop.dtsi), and the J715 runs were on an older base (58e712b9) with local-only patches, merge still requires clean exact-head (67755d70e92e) hardware rows for:- J713 no-regression boot (ideally on 27.2 firmware to cover firmware independence: dapf log, keyboard/trackpad, AOP microphones, regression counts);
- Desktop T8132 (e.g. J773g Mac mini) taking the AOP/PMP handoff via
t8132-jxxx.dtsifor the first time (dapf log, 0 new DART/AOP faults, regression counts).
- Coordinate merge order with
aurora-silicon/linux#2745as already noted.
- Because this change activates
Assisted-by: LLM (Gemini 4 Neon)
|
As the review says, this change makes Could someone boot
What to expect:
@RyanTheTide, @erikwb (J713), @sithglan: is a J773g in reach? Thanks in advance to whoever can. |
|
@sithglan: is a J773g in reach?
sorry I sold my J773g
|
dapf_init_fdt() called dapf_init_j713() only for the J713 and the J604. dapf_init_j713() already does nothing unless /chosen carries linux-enablement-mac,dapf-handoff, and it hands off only the consumers that property names (and programs those in dapf-halted-handoff as halted consumers). The board list adds nothing beyond the property, and every other T8132 Mac has to be added to it by hand. Drop the list and call dapf_init_j713() on every T8132 tree. A tree without the property keeps today's behaviour: the firmware's filter state is preserved. The host test drops its fdt_node_check_compatible() stub, which nothing calls any more, and now runs dapf_init_fdt() itself on T8132: with the property it reaches dapf_init_j713(), without it or without a tree it changes nothing, and a control that bypasses dapf_init_j713() fails. Tested on a J715 (15-inch M4 Air) with OS firmware 26.6.2, with the J715 tree naming /arm-io/mtp in dapf-halted-handoff as the J604's does: the MTP is cold-started by Linux, and the keyboard, trackpad, AOP microphones, display, GPU and speakers all come up. Signed-off-by: Kazuhide Takahashi <kazuhide.t@linux-powered.com>
67755d7 to
746c4cd
Compare
|
Rebased onto current
The request for a J713 or desktop T8132 row is unchanged. A boot of |
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
A note on the readiness summary: it counts my rebase comment above as a hardware row at Hardware evidence so far:
The request for a J713 or desktop T8132 (J773g) row at |
|
J773g (M4 Mac mini, T8132, firmware 27.2) Stage 2 row at The Mini needs #383 for display handoff on 27.2. I cleanly merged its head
The targeted |
What: take the T8132 DAPF handoff from the tree's
/chosenproperties instead of a J713/J604 board list indapf_init_fdt(), so a J715 tree that names its MTP as a halted consumer gets the handoff.Tested: J715 M4 Air at aura main
58e712b9+ this change (local-only J715 gates, see below), and again at main8b1cb8ce+ #494 + this change: MTP cold-started by Linux, keyboard and trackpad work, no DART faults. Not booted at746c4cd9itself.Risk: two-way · M4 (T8132) Macs whose tree carries
linux-enablement-mac,dapf-handoff: the laptops and, throught8132-jxxx.dtsi, the desktopsNot yet: a boot at this head; J713; a desktop T8132 (J773g).
Reworked as suggested: the T8132 board list in
dapf_init_fdt()is gone, anddapf_init_j713()runs on every T8132 tree. Whether anything is handed off is decided by/chosen'slinux-enablement-mac,dapf-handoff(anddapf-halted-handoff), as before. A tree without them keeps the firmware's filter state.Behaviour change for other T8132 trees. In the current device trees,
dapf-handoffsits int8132-jxxx.dtsi(AOP, PMP) andt8132-laptop.dtsi(adds the MTP). So T8132 Macs other than the J713 and J604 that include those files now get the handoff as well. I could only test the J715.Tested on a J715 (15-inch M4 Air), OS firmware 26.6.2, stage 1 → aura → Linux:
linux-enablement-mac,dapf-halted-handoff = "/arm-io/mtp",mtp_dartapple,remap-streams = <1 0>, <2 0>, <3 0>and the MTP on stream 0, ast8132-j604.dtsdoes (arm64: dts: apple: t8132-j715: hand the MTP over as a halted consumer linux#2745);Local-only parts of that test, not in this PR:
Since the halted handoff covers the J715's MTP, #430 is no longer needed and I'll close it.